package com.wcsy.myblog.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;

import java.sql.Timestamp;

/**
 * 文章表
 * */
@TableName("tb_article")
public class Article implements Comparable<Article>{
   @TableId(type = IdType.INPUT)
   @ApiModelProperty("文章id")
  private long articleId;
  @ApiModelProperty("文章名称")
  private String articleName;
  @ApiModelProperty("文章图片")
  private String articleImg;
  @ApiModelProperty("文章url")
  private String articleUrl;
  @ApiModelProperty("文章内容")
  private String articleContent;
  @ApiModelProperty("文章浏览量")
  private long pageviews;
  @ApiModelProperty("添加时间")
  private String addTime;
  @ApiModelProperty("修改时间")
  private String updateTime;
  @ApiModelProperty("文章类型id")
  private long type;
  @ApiModelProperty("文章标签id")
  private long label;
  @ApiModelProperty("文章所属用户id")
  private long userId;
  @ApiModelProperty("文章所属用户昵称")
  private String userName;
  @ApiModelProperty("文章所属用户头像")
  private String userImg;
  @ApiModelProperty("文章类型名称")
  private String typeName;
  @ApiModelProperty("文章标签名称")
  private String labelName;
  @ApiModelProperty("评论者id")
  private Long userIdPlus;
  @ApiModelProperty("评论内容")
  private String commentContent;
  @ApiModelProperty("评论时间")
  private String commentTime;
  @ApiModelProperty("？？id")
  private long noteUser;
  @ApiModelProperty("文章点赞数")
  private long articleLike;
  @ApiModelProperty("文章被收藏的数量")
  private int collectNumber; //文章被收藏的数量
  @ApiModelProperty("是否收藏")
  private Boolean iscollect; //是否收藏;
  @ApiModelProperty("是否点赞")
  private Boolean isLick;//是否点赞;
  @ApiModelProperty("是否关注")
  private Boolean isAttention;//是否关注

  public Boolean getAttention() {
    return isAttention;
  }

  public void setAttention(Boolean attention) {
    isAttention = attention;
  }

  public Boolean getLick() {
    return isLick;
  }

  public void setLick(Boolean lick) {
    isLick = lick;
  }

  public Boolean getIscollect() {
    return iscollect;
  }

  public void setIscollect(Boolean iscollect) {
    this.iscollect = iscollect;
  }

  public int getCollectNumber() {
    return collectNumber;
  }

  public void setCollectNumber(int collectNumber) {
    this.collectNumber = collectNumber;
  }

  public long getArticleLike() {
    return articleLike;
  }

  public void setArticleLike(long articleLike) {
    this.articleLike = articleLike;
  }

  public long getNoteUser() {
    return noteUser;
  }

  public void setNoteUser(long noteUser) {
    this.noteUser = noteUser;
  }

  public Long getUserIdPlus() {
    return userIdPlus;
  }

  public void setUserIdPlus(Long userIdPlus) {
    this.userIdPlus = userIdPlus;
  }

  public String getCommentContent() {
    return commentContent;
  }

  public void setCommentContent(String commentContent) {
    this.commentContent = commentContent;
  }

  public String getCommentTime() {
    return commentTime;
  }

  public void setCommentTime(String commentTime) {
    this.commentTime = commentTime;
  }

  public String getTypeName() {
    return typeName;
  }

  public void setTypeName(String typeName) {
    this.typeName = typeName;
  }

  public String getLabelName() {
    return labelName;
  }

  public void setLabelName(String labelName) {
    this.labelName = labelName;
  }

  public long getArticleId() {
    return articleId;
  }

  public void setArticleId(long articleId) {
    this.articleId = articleId;
  }


  public String getArticleName() {
    return articleName;
  }

  public void setArticleName(String articleName) {
    this.articleName = articleName;
  }


  public String getArticleImg() {
    return articleImg;
  }

  public void setArticleImg(String articleImg) {
    this.articleImg = articleImg;
  }


  public String getArticleUrl() {
    return articleUrl;
  }

  public void setArticleUrl(String articleUrl) {
    this.articleUrl = articleUrl;
  }


  public String getArticleContent() {
    return articleContent;
  }

  public void setArticleContent(String articleContent) {
    this.articleContent = articleContent;
  }


  public long getPageviews() {
    return pageviews;
  }

  public void setPageviews(long pageviews) {
    this.pageviews = pageviews;
  }


  public String getAddTime() {
    return addTime;
  }

  public void setAddTime(String addTime) {
    this.addTime = addTime;
  }


  public String getUpdateTime() {
    return updateTime;
  }

  public void setUpdateTime(String updateTime) {
    this.updateTime = updateTime;
  }


  public long getType() {
    return type;
  }

  public void setType(long type) {
    this.type = type;
  }


  public long getLabel() {
    return label;
  }

  public void setLabel(long label) {
    this.label = label;
  }


  public long getUserId() {
    return userId;
  }

  public void setUserId(long userId) {
    this.userId = userId;
  }

  public String getUserName() {
    return userName;
  }

  public void setUserName(String userName) {
    this.userName = userName;
  }

  public String getUserImg() {
    return userImg;
  }

  public void setUserImg(String userImg) {
    this.userImg = userImg;
  }

  @Override
  public String toString() {
    return "Article{" +
            "articleId=" + articleId +
            ", articleName='" + articleName + '\'' +
            ", articleImg='" + articleImg + '\'' +
            ", articleUrl='" + articleUrl + '\'' +
            ", articleContent='" + articleContent + '\'' +
            ", pageviews=" + pageviews +
            ", addTime='" + addTime + '\'' +
            ", updateTime='" + updateTime + '\'' +
            ", type=" + type +
            ", label=" + label +
            ", userId=" + userId +
            ", userName='" + userName + '\'' +
            ", userImg='" + userImg + '\'' +
            ", typeName='" + typeName + '\'' +
            ", labelName='" + labelName + '\'' +
            ", userIdPlus=" + userIdPlus +
            ", commentContent='" + commentContent + '\'' +
            ", commentTime='" + commentTime + '\'' +
            ", noteUser=" + noteUser +
            ", articleLike=" + articleLike +
            ", collectNumber=" + collectNumber +
            ", iscollect=" + iscollect +
            ", isLick=" + isLick +
            ", isAttention=" + isAttention +
            '}';
  }

  @Override
  public int compareTo(Article o) {
    return (int) (this.getArticleLike()-o.getArticleLike());
  }
}
